package com.shrct.businessprocess.product;

import com.shrct.businessprocess.organization.RCEnterprise;
import com.shrct.businessprocess.product.RCAnonymousProductEntry;
import com.shrct.businessprocess.product.RCProductSpecification;
import com.shrct.businessprocess.purchase.RCPurchaseOrderItem;
import edu.fudan.mylang.pf.IDAOService;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

public interface RCAnonymousProductEntryDAO extends IDAOService<RCAnonymousProductEntry> {
  public abstract RCAnonymousProductEntry create(final String batchSid, final Procedure1<? super RCAnonymousProductEntry> postInit);
  
  public abstract RCAnonymousProductEntry registerAnonymousProduct(final String projectId, final RCEnterprise enterprise, final String sid, final RCProductSpecification type, final Integer count);
  
  public abstract String calcAnonymoseProductSid(final RCPurchaseOrderItem orderItem);
  
  /**
   * 产品入库，登记产品并将其入库至云多的库存
   */
  public abstract RCAnonymousProductEntry inStockAnonymousProduct(final String projectId, final RCPurchaseOrderItem orderItem, final Integer count);
  
  public abstract void transferAnonymousProduct(final String projectId, final String sid, final Integer count, final RCEnterprise enterprise);
}
